from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from rest_framework.serializers import ModelSerializer


# 用户权限表序列化器
class PermissionSerializer(ModelSerializer):
    class Meta:
        model = Permission
        fields = "__all__"


# 权限类型序列化器
class ContentTypeSerializer(ModelSerializer):
    class Meta:
        model = ContentType
        fields = ('id', "name")
